package com.aptemo.webetek.client.widgets.paging;

import com.google.gwt.event.shared.GwtEvent;

public class PagingEvent
		extends GwtEvent<PagingHandler>
{

	public static final Type<PagingHandler>	TYPE	= new GwtEvent.Type<PagingHandler>();

	private int										from;
	private int										to;
	private int										page;

	public PagingEvent(int page, int from, int to)
	{
		super();
		this.from = from;
		this.to = to;

	}

	@Override
	protected void dispatch(PagingHandler handler)
	{
		handler.onNotification(this);
	}

	@Override
	public Type<PagingHandler> getAssociatedType()
	{
		return TYPE;
	}

	public int getFrom()
	{
		return from;
	}

	public void setFrom(int from)
	{
		this.from = from;
	}

	public int getTo()
	{
		return to;
	}

	public void setTo(int to)
	{
		this.to = to;
	}

	public int getPage()
	{
		return page;
	}

	public void setPage(int page)
	{
		this.page = page;
	}

}
